const MyPromise = require('./MyPromise')

let p2 = new MyPromise(function(resolve,reject){
    throw new Error('executor error')
});
p2.then(value=>{
    console.log(value)
},reason =>{
    console.log(reason)
})